import Vue from 'vue'
import Vuex from 'vuex'

Vue.use(Vuex)

export default new Vuex.Store({
	state: {
		token: 'token'
	},
	mutations: {
		SET_TOKEN: (state, token) => {
			state.token = token
		},
	},
	actions: {
		// 登录
		login({
			commit
		}, userInfo) {
			// login api
		}
	},
	getters: {
		token: state => state.token
	}
})
